TeamB

id: task-214 title: Add CLI command to list sequences status: Done assignee:

  • '@codex' created_date: '2025-07-27' updated_date: '2025-08-26 16:45' labels:
  • sequences
  • cli dependencies:
  • task-213

Description

Provide a command to inspect computed sequences. The command is interactive by default and supports --plain for machine-readable text output. It must reuse the core computation from task-213 and avoid duplicated logic.

Acceptance Criteria

  • [x] #1 Introduce a 'backlog sequence list' command; interactive by default; --plain outputs text
  • [x] #2 Plain output lists each sequence index and tasks as "task- - "</li> <li>[x] #3 Reuse core compute function from task-213; do not duplicate logic in CLI</li> <li>[x] #4 CLI help text explains usage and --plain flag</li> <li>[x] #5 Tests verify plain output format</li> <li>[x] #6 Exclude tasks with status Done from sequences</li> <li>[x] #7 --plain prints Unsequenced first (if present), then numbered sequences; Done tasks excluded</li> </ul> <!-- AC:END --> <h2>Implementation Plan</h2> <ol> <li>Add CLI group "sequence" with subcommand "list".</li> <li>Reuse computeSequences to compute layered groups from tasks.</li> <li>--plain: print machine-readable output: for each sequence, show "Sequence <n>:" and lines " task-<id> - <title>".</li> <li>Interactive default: open scrollable viewer with the same grouped content (no special TUI; 215.x will add rich TUI).</li> <li>Provide descriptive help/description for the command and flags.</li> <li>Add tests: create tasks with dependencies and assert plain output formatting.</li> <li>Run tests, lint check; adjust as needed.</li> </ol> <h2>Implementation Notes</h2> <p>Implemented sequence CLI command with interactive default and --plain format. Reused computeSequences, printed sequences deterministically, and added tests asserting plain output. Command help describes usage/flags. All tests pass locally.</p> <p>Exclude Done tasks from sequences:</p> <ul> <li>CLI filters Done before computeSequences.</li> <li>Added test to assert Done tasks are excluded from --plain output.</li> </ul> <p>Updated to print Unsequenced bucket first in --plain and TUI path consumes { unsequenced, sequences } from core.</p> <!-- BODY END --> </article> </div> <div class="right-sidebar"> <header>On this page</header> <p> <!-- OUTLINE START --> <div class="outline"><ol class="outline-level-1"><ol class="outline-level-2"><li class="outline-item-level-2"><a href="#Description">Description</a></li><li class="outline-item-level-2"><a href="#AcceptanceCriteria">Acceptance Criteria</a></li><li class="outline-item-level-2"><a href="#ImplementationPlan">Implementation Plan</a></li><li class="outline-item-level-2"><a href="#ImplementationNotes">Implementation Notes</a></li></ol></li></ol></div> <!-- OUTLINE END --> </p> </div> <div id="popup-overlay" class="popup-overlay hidden"></div> </div> <div class="bottombar"> <span>Brodocs MVP</span> </div> <div id="popup-modal" class="popup-modal"> <div class="popup-header"> <span id="popup-title" class="popup-title">Example Popup Title</span> <button class="popup-close" id="popup-close-btn">×</button> </div> <hr class="popup-separator"/> <div id="popup-content" class="popup-content"> <p>This is some example popup content text.</p> </div> <button class="popup-confirm" id="popup-confirm-btn">Close</button> </div> </body> </html>